﻿<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>Register - Swim System</title>
		<link rel="shortcut icon" href="favicon.ico">
		<link href="/swimpool-ssm/back/resources/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
		<link href="/swimpool-ssm/back/resources/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
		<link href="/swimpool-ssm/back/resources/css/animate.min.css" rel="stylesheet">
		<link href="/swimpool-ssm/back/resources/css/style.min.css?v=4.0.0" rel="stylesheet">
		<!--[if lt IE 8]>
		    <meta http-equiv="refresh" content="0;ie.html" />
		    <![endif]-->
		<script>
			if (window.top !== window.self) {
				window.top.location = window.location;
			}
		</script>
		<script src="/swimpool-ssm/back/resources/js/jquery.min.js?v=2.1.4"></script>
		<script src="/swimpool-ssm/back/resources/js/bootstrap.min.js?v=3.3.5"></script>
		<script type="text/javascript" src="/swimpool-ssm/js/My97DatePicker/WdatePicker.js"></script>
		<script src="/swimpool-ssm/js/util.js"></script>
	</head>
	<body class="gray-bg" style="background-image:url('/swimpool-ssm/img/11.png'); background-repeat: no-repeat ; background-size:cover;">
		<div class="middle-box text-center loginscreen  animated fadeInDown">
			<div>
				<!-- <div>
					<h1 class="logo-name">Swim System</h1>
				</div> -->
				<h3>Swim System Register</h3>
				<form class="m-t" role="form" id="form">
					<div class="form-group">
						<input type="email" name="email" id="email" class="form-control" placeholder="email"
							required="">
					</div>
					<div class="form-group">
						<input type="text" name="nickName" id="nickName" class="form-control" placeholder="nickName"
							required="">
					</div>
					<div class="form-group">
						<input type="password" name="password" id="password" class="form-control" placeholder="password"
							required="">
					</div>
					<div class="form-group">
						<input type="text" name="school" id="school" class="form-control" placeholder="school"
							required="">
					</div>
					<div class="form-group">
			          	<input class="form-control layer-date" placeholder="birthday" name="birthdayStr" id="birthday" required="required"
			          		onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})">
			          	<label class="laydate-icon"></label>
					</div>
					<button type="button" id="login" class="btn btn-primary block full-width m-b">register</button>
					<p class="text-muted text-center">
						<a href="/swimpool-ssm/back/login.html">login</a>
					</p>
					<div class="form-group">
						<span id="info" style="color:#FFFF00 ; font-size: 20px"></span>
					</div>
				</form>
			</div>
		</div>
	</body>
</html>
<script type="text/javascript">
	$('#login').click(function() {
		var postParam = $("#form").serialize();
		//console.info("===postParam==" + postParam)
		/* 提交数据 */
		$.post(
			rootPath + "/usersInsert.mvc",
			postParam,
			function(data){
				console.info(data + "==data===" + JSON.stringify(data));
				$("#info").html(data.info);
				$("#info").show();
			},
			"json"
		);
		return false ; 
	});
</script>